<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%
	
	String arSelection = "";
	String zhSelection = "";
	String enSelection = "";
	String frSelection = "";			
	String deSelection = "";
	String hiSelection = "";
	String itSelection = "";
	String koSelection = "";
	String ptSelection = "";	
	String esSelection = "";
	String jaSelection = "";
	String lang = request.getParameter("lang");
	if (lang == null){
		lang  = "en";
	}
	if (lang.equals("ar")){
		arSelection = "selected";
	}
	if  (lang.equals("en")){
		enSelection = "selected";
	}
	else if (lang.equals("zh")){
		zhSelection = "selected";
	}
	else if (lang.equals("fr")){
		frSelection = "selected";
	}
	
	
%>

<style type="text/css">
 body{
	 text-align:center;
 }
 label{
	 font-weight: bold;
 }
 .comment{
	background-color: rgb(221, 255, 221); 
	margin: 8px; 
	text-align:left;
	padding: 8px; 
	clear:both;
 }
 .required{
	 color:red;
 }
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%@ include file="../user/load_user_with_redirect.jsp" %>
<% 
Integer step = new Integer(0);
%>
<title>Reading Submit</title>
</head>
<body>
<jsp:include page="/user/user.jsp"/>
 <%@ include file="steps.jsp" %>
 <div style="width: 600px; margin:auto; text-align:left">
<form id="form1" name="form1" method="post" action="/user/readings/reading_submit_handler.jsp">
  <p>
    <label for="title">Title:</label>
    <span class="required">*</span>
    <input name="title" type="text" size="80" />
    <br />
    <label for="title">Language:</label>  <span class="required">*</span>
    <select name="language" id="language">
    <option value="ar" <%= arSelection %>>Arabic</option>
      <option value="zh" <%= zhSelection %>>Chinese</option>    

    <option value="en" <%= enSelection %>>English</option>
      <option value="fr" <%= frSelection %>>French</option>
  <option value="de" <%= deSelection %>>German</option>      
      <option value="hi" <%= hiSelection %>>Hindi</option>
      <option value="it" <%= itSelection %>>Italian</option>       <option value="ja" <%= jaSelection %>>Japanese</option>
         <option value="ko" <%= koSelection %>>Korean</option>

    <option value="pt" <%= ptSelection %>>Portuguese</option>
    <option value="es" <%= esSelection %>>Spanish</option>
    </select>

     
    <br />
    <label for="reading">Text:</label> <span class="required">*</span>
    <div class="comment">
      Please paste text in plain text - not HTML. A blank line should separate the paragraphs.<br /><br />
      Inappropriate content or texts with grammatical errors will be deleted.
    </div>
<textarea name="reading" id="reading" cols="80" rows="26"></textarea>
    
   </fieldset>
  </p>
  
  <div class="comment">When set to &quot;Word Granularity&quot;, pausing the reading will cause the reading to select the exact word that was being said, although the sound integration task is more involved. If the reading is relatively short it's best to use &quot;Word Granularity&quot;.</div>
    <p><label>
      <input name="granularity" type="radio" id="granularity_0" value="word" checked="checked" />
      Word Granularity</label>
    <br />
    <label>
      <input type="radio" name="granularity" value="sentence" id="granularity_1" />
     Sentence Granularity</label>
    <div class="comment">Is the text released under a creative commons or open source license? Feel free to provide a link to the original location or description.</div>
<p>
 <label for="source">Source of Text:</label> <span class="required">*</span>
   <input type="text" name="source" id="source" />
</p>
<p>
  <label for="source2">Comments:</label>
  <textarea name="comments" cols="80" rows="8"></textarea>
</p>
  <p>
    <input name="Submit" type="submit" value="Submit" style="margin-left: 20px;"/>
  </p>
</form>
</div>
</body>
</html>
